package memorphic.logging
{
	import flash.net.LocalConnection;
	import flash.net.registerClassAlias;
	
	import mx.logging.AbstractTarget;
	import mx.logging.LogEvent;
	
	public class LocalConnectionLogTarget extends AbstractTarget
	{
		
		{
			registerClassAlias("mx.logging.LogEvent", LogEvent);
		}


		private var connection:LocalConnection;
		
		public var connectionName:String = "_slide_logger";
		
		public var logMethodName:String = "logEvent";
		
		
		public function LocalConnectionLogTarget()
		{
			connection = new LocalConnection();
		}

		
		public override function logEvent(event:LogEvent):void
		{
			connection.send(connectionName, logMethodName, event); 
		}
		
		
	}
}